/*
 * Filename:    IntegrityMedicalDaoImpl.java
 * Copyright:   2014 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2014年10月30日
 */
package com.paic.mhis.hcpms.trust.intergration.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.paic.mhis.hcpms.trust.dto.IntegrityMedicalDTO;
import com.paic.mhis.hcpms.trust.dto.IntegrityMedicalDoctorDTO;
import com.paic.mhis.hcpms.trust.dto.IntegrityMedicalOrgDTO;
import com.paic.mhis.hcpms.trust.dto.PointCutDTO;
import com.paic.mhis.hcpms.trust.intergration.dao.IntegrityMedicalDAO;
import com.paic.mhis.hcpms.warning.dto.WarningDeductionDTO;
import com.paic.pafa.biz.dao.BaseDAO;
import com.paic.pafa.exceptions.BusinessException;

@Component("integrityMedicalDao")
public class IntegrityMedicalDaoImpl extends BaseDAO implements IntegrityMedicalDAO {

	@Override
	public List<IntegrityMedicalDTO> findIntegrityMedical(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityMedical", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityMedicalDesc(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityMedicalDesc", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityAuditAndApproveMedicalDesc(Map<String, Object> paramMap)
			throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityAuditAndApproveMedicalDesc", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityMedicalMark(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityMedicalMark", paramMap);
	}

	@Override
	public List<IntegrityMedicalDoctorDTO> findIntegrityDoctor(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDoctorDTO>) this._list("integrityDoctor", paramMap);
	}

	@Override
	public int countIntegrityMedical(Map<String, Object> paramMap) throws BusinessException {
		return this._getInt("countIntegrityMedical", paramMap);
	}

	@Override
	public List<IntegrityMedicalOrgDTO> findIntegrityOrg(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalOrgDTO>) this._list("integrityOrg", paramMap);
	}

	@Override
	public void addIntegrityPoint(PointCutDTO pointCut) throws BusinessException {
		this._insert("addIntegrityPoint", pointCut);
	}

	@Override
	public void addIntegrityPoints(List<PointCutDTO> pointCuts) throws BusinessException {
		this._insert("addIntegrityPoints", pointCuts);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityMedicalTotal(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityMedicalTotal", paramMap);
	}

	@Override
	public int countIntegrityMedicalTotal(Map<String, Object> paramMap) throws BusinessException {
		return this._getInt("countIntegrityMedicalTotal", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityMedicalReport(Map<String, Object> paramMap) throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityMedicalReport", paramMap);
	}

	@Override
	public int countIntegrityMedicalReport(Map<String, Object> paramMap) throws BusinessException {
		return this._getInt("countIntegrityMedicalReport", paramMap);
	}

	@Override
	public void addIntegrityPointTemps(List<PointCutDTO> pointCuts) throws BusinessException {
		this._insert("addIntegrityTempPoints", pointCuts);
	}

	@Override
	public List<PointCutDTO> findPointCuts(Map<String, Object> paramMap) throws BusinessException {
		return (List<PointCutDTO>) this._list("hcpmsQueryPointCut", paramMap);
	}

	@Override
	public List<PointCutDTO> findPointCutTemps(Map<String, Object> paramMap) throws BusinessException {
		return (List<PointCutDTO>) this._list("hcpmsQueryPointCutTemp", paramMap);
	}

	@Override
	public void addPointCut(Map<String, Object> paramMap) throws BusinessException {
		this._insert("addPointCut", paramMap);
	}

	@Override
	public void deletePointCut(List<PointCutDTO> ids) throws BusinessException {
		this._delete("deletePointCut", ids);
	}

	@Override
	public String mediCalContentPoint(Map<String, Object> paramMap) throws BusinessException {
		return (String) this._queryForObject("hcpmsQueryPointScore", paramMap);
	}

	@Override
	public List<WarningDeductionDTO> findIdStandardScores(Map<String, Object> paramMap) throws BusinessException {
		return (List<WarningDeductionDTO>) this._list("hcpmsQueryIdStandardScore", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityInsuranceUpdateDesc(Map<String, Object> paramMap)
			throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityInsuranceUpdateDesc", paramMap);
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityInsuranceAuditApproveDesc(Map<String, Object> paramMap)
			throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityInsuranceAuditApproveDesc", paramMap);
	}

	@Override
	public boolean updateStorageSaveDatePoint(Map<String, Object> paramMap) throws BusinessException {
		int result = this._update("insurance.updateStorageSaveDatePoint", paramMap);
		if (result > 0) {
			return true;
		}
		return false;
	}

	@Override
	public List<IntegrityMedicalDTO> findIntegrityInsuranceClosedDesc(Map<String, Object> paramMap)
			throws BusinessException {
		return (List<IntegrityMedicalDTO>) this._list("integrityInsuranceClosedDesc", paramMap);
	}

	@Override
	public int countStorageSaveDatePoint(Map<String, Object> paramMap) throws BusinessException {
		return this._getInt("insurance.countStorageSaveDatePoint", paramMap);
	}

	public void saveAuditOpinion(Map param) {
		this._insert("saveAuditOpinion", param);

	}

	public void saveAuditBatchOpinion(List paramList) {
		this._insert("saveAuditBatchOpinion", paramList);

	}

	@Override
	public void deleteIntegrityStorageSaveData(Map<String, Object> paramMap) throws BusinessException {
		this._delete("deleteIntegrityStorageSaveData", paramMap);
	}
}
